#ifndef _TEXTURE_MANAGER_H
#define _TEXTURE_MANAGER_H

#include <map>
#include <string>
#include <boost/shared_ptr.hpp>

class GLTexture;

class TextureManager
{
private:
    static bool m_instanceFlag;
    static TextureManager* m_manager;

    std::map<std::string, boost::shared_ptr<GLTexture>> m_textures;

public:
    // Constructors and destructors
    virtual ~TextureManager(void);

    // Others
    bool addTexture(boost::shared_ptr<GLTexture> texture);
    bool hasTexture(const std::string &filename);
    void purgeTextures(void);

    // Getters
    static TextureManager* getInstance(void);
    boost::shared_ptr<GLTexture> getTexture(const std::string &name) const;

private:
    TextureManager(void);

};


#endif